/* $Id: CreateMapDialogFactory.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.map.swing;


import org.crazydays.gameplan.controller.Controller;
import org.crazydays.gameplan.view.View;

/**
 * CreateMapDialogFactory
 */
public class CreateMapDialogFactory
{
    /** view */
    protected View view;

    /** controller */
    protected Controller controller;

    /**
     * Set view.
     * 
     * @param view View
     */
    public void setView(View view)
    {
        this.view = view;
    }

    /**
     * Set controller.
     * 
     * @param controller Controller
     */
    public void setController(Controller controller)
    {
        this.controller = controller;
    }

    /**
     * Get create map dialog.
     * 
     * @return JCreateMapDialog
     */
    public JCreateMapDialog getCreateMapDialog()
    {
        JCreateMapDialog createMapDialog = new JCreateMapDialog(view);
        createMapDialog.setController(controller);
        createMapDialog.initialize();

        return createMapDialog;
    }
}
